<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>编辑</title>
<link rel="icon" href="favicon.ico" type="image/ico">
<link href="/Public/Admin/css/bootstrap.min.css" rel="stylesheet">
<link href="/Public/Admin/css/materialdesignicons.min.css" rel="stylesheet">
<!--标签插件-->
<link rel="stylesheet" href="/Public/Admin/js/jquery-tagsinput/jquery.tagsinput.min.css">
<link href="/Public/Admin/css/style.min.css" rel="stylesheet">
</head>

<body>
<div class="container-fluid p-t-15">
  <div class="row">
    <div class="col-lg-12">
      <div class="card">
        <div class="card-body">
          <form action="#" method="post" name="editUser" id="editUser" class="editUser">
            <input type="text" id="id" name="id" class="id" value="<?php echo $arr['uid'];?>" style="display:none" />
            <div class="form-group col-md-12">
              <label for="seo_description">用户名</label>
              <input class="form-control" type="text" id="account" name="account" value="<?php echo $arr['account'];?>" />
            </div>
            <div class="form-group col-md-12">
              <label for="tags">名称</label>
              <input class="form-control" type="text" id="name" name="name" value="<?php echo $arr['name'];?>" />
            </div>
            <div class="form-group col-md-12">
              <label for="sort">性别</label>
              <input type="text" class="form-control" id="sex" name="sex" value="<?php echo $arr['sex'];?>" />
            </div>
            <div class="form-group col-md-12">
              <label for="sort">手机</label>
              <input type="text" class="form-control" id="phone" name="phone" value="<?php echo $arr['phone'];?>" />
            </div>
            <div class="form-group col-md-12">
              <label for="sort">QQ</label>
              <input type="text" class="form-control" id="qq" name="qq" value="<?php echo $arr['qq'];?>" />
            </div>
            <div class="form-group col-md-12">
              <label for="sort">邮箱</label>
              <input type="text" class="form-control" id="email" name="email" value="<?php echo $arr['email'];?>" />
            </div>
            <div class="form-group col-md-12">
              <button id="editUserbtn" type="submit" class="btn btn-success ajax-post confirm" target-form="editUser">确 定</button>
              <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);return false;">返 回</button>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript" src="/Public/Admin/js/jquery.min.js"></script> 
<script type="text/javascript" src="/Public/Admin/js/bootstrap.min.js"></script> 
<script type="text/javascript" src="/Public/Admin/js/perfect-scrollbar.min.js"></script> 
<!--标签插件--> 
<script src="/Public/Admin/js/jquery-tagsinput/jquery.tagsinput.min.js"></script> 
<script type="text/javascript" src="/Public/Admin/js/main.min.js"></script> 
<script type="text/javascript" src="/Public/Admin/js/bootstrap-notify.min.js"></script> 
<script type="text/javascript" src="/Public/Admin/js/lyear-loading.js"></script> 
<script type="text/javascript">
$("#editUserbtn").click(function(){
  $.post("?c=User&a=editUser",
  $('#editUser').serialize(),
  function(status){
      if(status==200){
          $.notify({
    		// options
    		message: '成功修改<br>点击本消息跳转到用户列表',
    		url: '?c=User&a=showUser',
    		target: '_self'
		  },{
    		// settings
    		type: 'info',
    		delay: 5000,
    		placement: {
    		from: "top",
    		align: "right"
    		}
		  });
      }
      else{
          console.log(status);
          $.notify({
    		// options
    		message: '失败<br>请检查后重试',
    		//url: '?c=Topic&a=showTopic',
    		//target: '_self'
		  },{
    		// settings
    		type: 'danger',
    		delay: 5000,
    		placement: {
    		from: "top",
    		align: "right"
    		}
		  });
      }
	  
});
//这里return false了就能不刷新了
return false;
}); 
</script>
</body>
</html>